import Request from "../util/request"

export const addAdvRequest = function (data) {
    return Request.post("/addAdv", data)
}
export const findAdvRequest = function (pageNo=1,everyNum=3) {
    return Request.get(`/advList/${pageNo}/${everyNum}`)
}
export const deleteAdvRequest = function (_id) {
    return Request.delete("/deleteAdv", {
        params: {
            _id
        }
    })
}
export const updateAdvRequest = function (_id,data) {
    return Request.put("/updateAdv", data, {
        params: {
            _id
        }
    })
}